import { SDKTools } from "../SDKTools";
import { IMiniGameRunTime } from "./IMiniGameRunTime";

export class KSRunTimeSDK implements IMiniGameRunTime {
    login(): Promise<string> {
        return new Promise((resolve, reject) => {
            SDKTools.m_ADClass.login({
                success: function (res) {
                    resolve(res.code);
                },
                fail: function (error) {
                    resolve(null);
                },
                complete: function () {
                    console.log("login complete");
                }
            })
        });
    }

}